#!/bin/bash
#service ciweb2g start || true
chkconfig --add logdispatcher
chkconfig logdispatcher --level=12345 on

if grep -q fifo /etc/syslog.conf
then
	echo " configuration already updated"
else
cat >> /etc/syslog.conf << EOF
# For logDispatcher.pl
local0.*                                                |var/log/fifo/local0.fifo
local1.*                                                |var/log/fifo/local1.fifo
local2.*                                                |var/log/fifo/local2.fifo
local3.*                                                |var/log/fifo/local3.fifo
local4.*                                                |var/log/fifo/local4.fifo
local5.*                                                |var/log/fifo/local5.fifo
local6.*                                                |var/log/fifo/local6.fifo
local7.*                                                |var/log/fifo/local7.fifo
EOF

	echo " configuration updated"
	service syslog reload
fi
